#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.common.bean.vo;

import ${package}.common.emum.CommonStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * Description: CodeType 描述代码类型
 *
 * @author wenxiaopeng
 * @date 2020/07/24 13:55
 *
 * <pre>
 *              ${copyright}
 *      Copyright (c) 2019. All Rights Reserved.
 * </pre>
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "代码类型VO")
public class CodeTypeVo implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty("代码类型ID")
	private Long id;

	@ApiModelProperty("代码类型")
	private String codeType;

	@ApiModelProperty("代码生成方式 0-待定 1-自动 2-导入")
	private Integer createWay;

	@ApiModelProperty("代码类型描述")
	private String description;

	 /** @see ${package}.common.emum.CommonStatusEnum */
	@ApiModelProperty("代码类型状态 占位用")
	private Integer status;

	@ApiModelProperty("codeType下的代码列表")
	private List<CodeVo> codes;

	public CodeTypeApiVo asApiVo() {
		return new CodeTypeApiVo(id, codeType, description, CommonStatusEnum.STATUS_VALID.getCode().equals(status));
	}

}
